import com.google.appengine.api.datastore.Entity
import com.google.appengine.api.datastore.KeyFactory

if(params.id && params.id.isNumber()){
	def key = KeyFactory.createKey("comicShow", params.id.toLong())
	def comicShow = datastore.get(key)
	if(comicShow){
		response.status = 200
		out.write  '{"message":"success", "comic" : {"id":"'+comicShow.key.id+'", "transitions":'+comicShow.transitions+'}}'
	} else {
		response.status = 404
		out.write '{"message":"not-found"}'
	}
	
} else { 
	response.status = 400
	out.write '{"message":"fail"}'
}

